using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_BizOrderTypeMap : EntityTypeConfiguration<FMS_BizOrderType>
	{
		public FMS_BizOrderTypeMap()
		{
			// Primary Key
			this.HasKey(t => t.Id);

			// Properties
			this.Property(t => t.TypeName)
				.HasMaxLength(20);
				
			this.Property(t => t.TypeCode)
				.HasMaxLength(20);
				
			// Table & Column Mappings
			this.ToTable("FMS_BizOrderType");
			this.Property(t => t.Id).HasColumnName("Id");
			this.Property(t => t.TypeName).HasColumnName("TypeName");
			this.Property(t => t.TypeCode).HasColumnName("TypeCode");
			this.Property(t => t.PlatformId).HasColumnName("PlatformId");
			this.Property(t => t.Direction).HasColumnName("Direction");
			this.Property(t => t.CreateUser).HasColumnName("CreateUser");
			this.Property(t => t.UpdateUser).HasColumnName("UpdateUser");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.CreateDeptId).HasColumnName("CreateDeptId");
			this.Property(t => t.UpdateDeptId).HasColumnName("UpdateDeptId");
		}
	}
}

